-
Notifications
You must be signed in to change notification settings - Fork 213
add support for handling cursor pagination in API 2019-07+ #134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add support for handling cursor pagination in API 2019-07+ #134
Conversation
@tareqtms can you maybe fix the host on the travis build? |
@janmyszkier |
I get the following error when using this example.
|
@joeyc002 $productResource = $shopify->Product();
$products = $productResource->get(['limit'=>50]);
$nextPageProducts = $productResource->get($productResource->getNextPageParams()); |
Thanks for this, however the array returned to "$nextPageProducts" is exactly the same as "$products". The same page is returned with both variables. I am using a test shop with 68 products / 300 variants. $productResource->getNextPageParams() returns an empty array. |
@joeyc002 this works fine for me. your problem is probably related to #143 |
Ah yes you're right! I changed to 'Link' instead of 'link' in ShopifyResource.php and this is now working. |
I have got this working now, `$perPage = 250; // max = 250 do{ |
@joeyc002
is actually our own wrapper, I should've posted it with clean implementation. But I'm glad you have figured it out 💪 |
Adding support for cursor pagination.
example usage: